﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="mybuy.aspx.cs" Inherits="ProjectX.mybuy" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>我的购买</title>
    <link href="WebCss/base.css" rel="stylesheet" type="text/css" />
    <link href="WebCss/Search.css" rel="stylesheet" type="text/css" />
    <script src="ClientJs/jquery.js" type="text/javascript"></script>
    <script src="ClientJs/jquery.loadthumb.js" type="text/javascript"></script>
    <script type="text/javascript" language="javascript">
        $(document).ready(function () {
            ResizeImg();
        });
        function ResizeImg() {
            var imgcount = $(".imgcss").length;
            for (var i = 0; i < imgcount; i++) {
                $($(".imgcss")[i]).loadthumb({
                    "src": $(".imgcss")[i].src,
                    "imgId": $(".imgcss")[i].id,
                    "parentId": $($(".imgcss")[i]).parent()[0].id
                });
            }
            $(".rowbackcolor").bind("mouseover mouseout", function () {
                $(this).toggleClass("rowbackcolor2");
            });
            $("#licont1").click(function () {
                $("#Content1").show();
                $("#Content2").hide();
                if ($(this).hasClass("noselectsell")) {
                    $(this).removeClass("noselectsell");
                    $("#licont2").addClass("noselectsell");
                }
            });
            $("#licont2").click(function () {
                $("#Content2").show();
                $("#Content1").hide();
                if ($(this).hasClass("noselectsell")) {
                    $(this).removeClass("noselectsell");
                    $("#licont1").addClass("noselectsell");
                }
            });
            $("a[disabled]").css({ border: "1px solid #999", color: "#999", "text-decoration": "none" });

            $("#mainpage").hover(function () { $(this).addClass("mainActive"); }, function () { $(this).removeClass("mainActive"); });
            $("#buy").hover(function () { $(this).addClass("buylinkactive"); }, function () { $(this).removeClass("buylinkactive"); });
            $("#allbuy").hover(function () { $(this).addClass("allbuylinkactive"); }, function () { $(this).removeClass("allbuylinkactive"); });
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div id="headTop">
        <p>
            <asp:HyperLink ID="username" runat="server" NavigateUrl="/userCenter.html" ForeColor="Red"></asp:HyperLink>&nbsp&nbsp&nbsp欢迎来到淘我想淘网！
            <strong>
                <asp:HyperLink ID="loginlink" runat="server" NavigateUrl="/login.html" ForeColor="White">[请登录]</asp:HyperLink>&nbsp<font color="red">|</font>&nbsp<asp:HyperLink ID="reglink" runat="server" NavigateUrl="/regedit.html" ForeColor="White">[免费注册]</asp:HyperLink>
                <asp:LinkButton ID="logout" runat="server" ForeColor="White" 
                Visible="false" onclick="logout_Click">[退出]</asp:LinkButton>
            </strong>
            <span>
                <a href="/userCenter.html" target="_self" style="color:White">[用户中心]</a>&nbsp<font color="red">|</font>&nbsp[帮助中心]
            </span>
        </p>
    </div>
    <div id="newHeader" >
        <div>
            <a href="/" class="logo hidetxt"></a>
        </div>
        <ul id="newNav">
            <li><a id="mainpage" href="/" target="_parent" class="mainlink"></a></li>
            <li><a id="buy" href="/buy.html" target="_parent" class="buylink"></a></li>
            <li><a id="mybuy" href="/mybuy.html"  target="_parent" class="mybuylinkactive"></a></li>
            <li><a id="allbuy" href="/allbuy.html"  target="_parent" class="allbuylink"></a></li>
        </ul>
    </div>
    <div style="width:996px;text-align:left;margin:0 auto;">
        <ul style="border-bottom: 2px solid #5CB7E5;height:29px;">
            <li class="selltitle" id="licont1">
                <h4>我发起的购买</h4>
            </li>
            <li class="selltitle noselectsell" id="licont2">
                <h4>我参与的购买</h4>
            </li>
        </ul>
    </div>
    <div id="main">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <div id="Content1" style="padding:10px;">
                    <asp:GridView ID="mybuyview" runat="server" AutoGenerateColumns="False" 
                        EnableModelValidation="True" GridLines="None" 
                        Width="980px" ShowHeader="False">
                        <Columns>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <div id="imgparent">
                                        <asp:Image ID="mybuyimg" CssClass="imgcss" runat="server" ImageUrl='<%# Eval("imgsrc").ToString().Trim()==""?"images/webkey_1_009.png":Eval("imgsrc") %>' />
                                    </div>
                                </ItemTemplate>
                                <ItemStyle Width="130px" CssClass="rowcss" />
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <div style="height:40px;">
                                        <div>
                                            <a href="<%# Eval("id") %>.html" target="_blank">
                                                <span><%# Eval("Title") %></span>
                                            </a>
                                        </div>
                                    </div>
                                    <div>
                                        <ul>
                                            <li class="licss"><span style="float:left;margin-right:20px;">期望价格：<span class="fontcolor">￥<%# Eval("ExpectpricesMax")%></span></span><span style="float:left;">宝贝：<span class="fontcolor"><%# Eval("name") %></span></span><div class="clearfix"></div>
                                            </li>
                                            <li class="licss">特殊要求：<span class="fontcolor"><%# Eval("Keyprop").ToString().Trim().Equals("") ? "" : Eval("Keyprop") + "，"%></span><span class="fontcolor"><%# "送给" + Eval("Owner")%></span></li>
                                        </ul>
                                    </div>
                                </ItemTemplate>
                        
                                <ItemStyle Width="580px" HorizontalAlign="Left" VerticalAlign="Top" 
                                    CssClass="contentd rowcss" />
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <div style="height:100px;text-align:center;">
                                        <label title="参与的淘友"><h1><strong style="color:#FF8000"><%# Eval("Respondcount")%></strong></h1>位淘友有兴趣</label> 
                                    </div>
                                </ItemTemplate>
                            <ItemStyle Width="120px" CssClass="contentd rowcss" HorizontalAlign="Left" />
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <div style="height:30px;">
                                        <h4 style="color:#3396e4;"><%# Eval("ReleaseName")%></h4>
                                    </div>
                                    <div style="margin-bottom:10px;">
                                        <span style="color:#3396e4;"><%# Eval("Starttime", "{0:yyyy-MM-dd HH:mm:ss}")%></span>
                                    </div>
                                    <a href="<%# Eval("id") %>.html" target="_blank"><img src="<%# Eval("Status").ToString().Trim().Equals("0") ? "/images/button.png":"/images/oldpass.png" %>" alt="" /></a>
                                </ItemTemplate>
                                <ItemStyle VerticalAlign="Bottom" HorizontalAlign="right" CssClass="linktd rowcss" Width="150px" />
                            </asp:TemplateField>
                        </Columns>
                        <EmptyDataTemplate>
                            <font color="#C0C0C0">您还没有发起任何购买</font>
                        </EmptyDataTemplate>
                        <EmptyDataRowStyle CssClass="rowcss" />
                        <HeaderStyle HorizontalAlign="Center" />
                        <PagerStyle HorizontalAlign="Center" Width="980px" />
                        <RowStyle CssClass="rowbackcolor" />
                    </asp:GridView>
                    <webdiyer:aspnetpager id="AspNetPagermybuy" runat="server" HorizontalAlign="Center"
                    Width="980px" CustomInfoHTML="共%PageCount%页，当前为第%CurrentPageIndex%页" CustomInfoTextAlign="Left" 
                    Direction="LeftToRight" FirstPageText="首页" LastPageText="尾页" LayoutType="Div" 
                    NextPageText="下一页" PageIndexBoxType="TextBox" PrevPageText="上一页" 
                    ShowPageIndexBox="Never" PageSize="10" 
                        onpagechanged="AspNetPagermybuy_PageChanged" ShowNavigationToolTip="True" 
                    EnableTheming="False" NumericButtonCount="6" AlwaysShow="True" 
                        CssClass="pagercss" CurrentPageButtonPosition="Center" UrlPageIndexName="currpage" 
                        Wrap="False" CurrentPageButtonClass="currentpage"></webdiyer:aspnetpager>
                </div>
                <div id="Content2" style="padding:10px;display:none;">
                    <asp:GridView ID="myaddview" runat="server" AutoGenerateColumns="False" 
                        EnableModelValidation="True" GridLines="None" 
                        Width="980px" ShowHeader="False">
                        <Columns>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <div id="imgparent">
                                        <asp:Image ID="mybuyimg" CssClass="imgcss" runat="server" ImageUrl='<%# Eval("imgsrc").ToString().Trim()==""?"images/webkey_1_009.png":Eval("imgsrc") %>' />
                                    </div>
                                </ItemTemplate>
                                <ItemStyle Width="130px" CssClass="rowcss" />
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <div style="height:40px;">
                                        <div>
                                            <a href="<%# Eval("id") %>.html" target="_blank">
                                                <span><%# Eval("Title") %></span>
                                            </a>
                                        </div>
                                    </div>
                                    <div>
                                        <ul>
                                            <li class="licss"><span style="float:left;margin-right:20px;">期望价格：<span class="fontcolor">￥<%# Eval("ExpectpricesMax")%></span></span><span style="float:left;">宝贝：<span class="fontcolor"><%# Eval("name") %></span></span><div class="clearfix"></div>
                                            </li>
                                            <li class="licss">特殊要求：<span class="fontcolor"><%# Eval("Keyprop").ToString().Trim().Equals("") ? "" : Eval("Keyprop") + "，"%></span><span class="fontcolor"><%# "送给" + Eval("Owner")%></span></li>
                                        </ul>
                                    </div>
                                </ItemTemplate>
                        
                                <ItemStyle Width="580px" HorizontalAlign="Left" VerticalAlign="Top" 
                                    CssClass="contentd rowcss" />
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <div style="height:100px;text-align:center;">
                                        <label title="参与的淘友"><h1><strong style="color:#FF8000"><%# Eval("Respondcount")%></strong></h1>位淘友有兴趣</label> 
                                    </div>
                                </ItemTemplate>
                            <ItemStyle Width="120px" CssClass="contentd rowcss" HorizontalAlign="Left" />
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <div style="height:30px;">
                                        <h4 style="color:#3396e4;"><%# Eval("ReleaseName")%></h4>
                                    </div>
                                    <div style="margin-bottom:10px;">
                                        <span style="color:#3396e4;"><%# Eval("Starttime", "{0:yyyy-MM-dd HH:mm:ss}")%></span>
                                    </div>
                                    <a href="<%# Eval("id") %>.html" target="_blank"><img src="<%# Eval("Status").ToString().Trim().Equals("0") ? "/images/button.png":"/images/oldpass.png" %>" alt="" /></a>
                                </ItemTemplate>
                                <ItemStyle VerticalAlign="Bottom" HorizontalAlign="right" CssClass="linktd rowcss" Width="150px" />
                            </asp:TemplateField>
                        </Columns>
                        <EmptyDataTemplate>
                            <font color="#C0C0C0">您还没有参与任何购买</font>
                        </EmptyDataTemplate>
                        <EmptyDataRowStyle CssClass="rowcss" />
                        <HeaderStyle HorizontalAlign="Center" />
                        <PagerStyle HorizontalAlign="Center" Width="980px" />
                        <RowStyle CssClass="rowbackcolor" />
                    </asp:GridView>
                    <webdiyer:aspnetpager id="AspNetPagermyadd" runat="server" HorizontalAlign="Center"
                    Width="980px" CustomInfoHTML="共%PageCount%页，当前为第%CurrentPageIndex%页" CustomInfoTextAlign="Left" 
                    Direction="LeftToRight" FirstPageText="首页" LastPageText="尾页" LayoutType="Div" 
                    NextPageText="下一页" PageIndexBoxType="TextBox" PrevPageText="上一页" 
                    ShowPageIndexBox="Never" PageSize="10" 
                        onpagechanged="AspNetPagermyadd_PageChanged" ShowNavigationToolTip="True" 
                    EnableTheming="False" NumericButtonCount="6" AlwaysShow="True" 
                        CssClass="pagercss" CurrentPageButtonPosition="Center" UrlPageIndexName="currpage" 
                        Wrap="False" CurrentPageButtonClass="currentpage"></webdiyer:aspnetpager>
                </div>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="AspNetPagermybuy" 
                    EventName="PageChanged" />
                <asp:AsyncPostBackTrigger ControlID="AspNetPagermyadd" 
                    EventName="PageChanged" />
            </Triggers>
        </asp:UpdatePanel>

    </div>
    <iframe id="Ifooter" style="border: none;margin-top:30px;margin-bottom:30px;" width="998px" height="250px" src="/footer.aspx" scrolling="no"></iframe>
    </form>
</body>
</html>
